<?php 
/* create arrays for each secion page possiblities for use as class=currentpage*/
$settingsPage_current = array('users', 'userform', 'settings');
$homePage_current = array('homeDashboard','moduleform');
$meetingPage_current = array('meetings','groups','meeting_types','locations','role_call_report','print_list'); 
$newsEventsPage_current = array('events','eventCal','eventsform','newsarrange','newsform','news_eventsDashboard');
$contactsPage_current = array('users', 'contacts');

?>
<!--Settings-->
<h2 <?php 
	if (in_array($current_file_name, $settingsPage_current)) {
		echo "class=\"currentpage has_submenu\""; 
	}else {
		echo "class=\"has_submenu\"";} ?>
>
  <div id="menu_settings" class="menu_item">Settings</div>
  <div id="settings_toggle" class="toggle">toggle</div>
</h2>
<ul class="nav" id="settingsMenu">
  <li>
  	<a <?php if ($current_file_name=="users") echo "id=\"currentpage\""; ?> href="users.php">Users</a>
    <span class="addUser">adduser</span>
    <div class="tooltip">Add a new user</div>
  </li>
  <li><a <?php if ($current_file_name=="userform") echo "id=\"currentpage\""; ?> href="userform.php">My Info</a></li>
  <li><a <?php if ($current_file_name=="settings") echo "id=\"currentpage\""; ?> href="settings.php">General Settings</a></li>
</ul>
<!--Home-->
<h2 <?php 
	if (in_array($current_file_name, $homePage_current)) {
		echo "class=\"currentpage has_submenu\"";
	}else {
		echo "class=\"has_submenu\"";} ?>
>
  <div id="menu_home" class="menu_item">Home</div>
  <div id="home_toggle" class="toggle">toggle</div>   
</h2>
<ul class="nav" id="homeMenu">
  <li><a <?php if ($current_file_name=="homeDashboard") echo "id=\"currentpage\""; ?> href="homeDashboard.php">Arrange</a></li>
  <li><a <?php if ($current_file_name=="moduleform") echo "id=\"currentpage\""; ?> href="moduleform.php">Home Section +</a></li>
</ul>
<!--Meetings-->
<h2 <?php 
	if (in_array($current_file_name, $meetingPage_current)) {
		echo "class=\"currentpage has_submenu\""; 
	}else {
		echo "class=\"has_submenu\"";} ?>
>
  <div id="menu_meetings" class="menu_item">Meetings</div>
  <div id="meetings_toggle" class="toggle">toggle</div>
</h2>
<ul class="nav" id="meetingMenu">
  <li>
  	<a <?php if ($_GET['page']=="groups" || $current_file_name=="groupform") echo "id=\"currentpage\""; ?> href="meetings.php?page=groups">Groups</a>
  	<span id="addGroup">addgroup</span>
    <div class="tooltip">Add a new group</div>
  </li>
  <li>
  	<a <?php if ($_GET['page']=="meetings" || $current_file_name=="meetingsform") echo "id=\"currentpage\""; ?> href="meetings.php?page=meetings">Meetings</a>
  	<span id="addMeeting">addMeeting</span>
    <div class="tooltip">Add a new meeting</div>
  </li>
  <li><a <?php if ($_GET['page']=="types") echo "id=\"currentpage\""; ?> href="meetings.php?page=types">Meeting Types</a>
  	<span id="addMeetingType">addMeetingType</span>
    <div class="tooltip">Add a new meeting type</div>
  </li>
  
  <li><a <?php if ($_GET['page']=="locations" || $current_file_name=="locationsform") echo "id=\"currentpage\""; ?> href="meetings.php?page=locations">Locations</a>
  	<span id="addLocation">addlocation</span>
    <div class="tooltip">Add a new location</div>
 </li>
  <li><a <?php if ($current_file_name=="role_call_report") echo "id=\"currentpage\""; ?> href="role_call_report.php"> Print Roll Call</a></li>
  <li><a <?php if ($current_file_name=="print_list") echo "id=\"currentpage\""; ?> href="print_list.php">Print Meeting List</a></li>
</ul>
<!--News/Events-->
<h2 <?php 
	if (in_array($current_file_name, $newsEventsPage_current)) {
		echo "class=\"currentpage has_submenu\""; 
	}else {
		echo "class=\"has_submenu\"";} ?>
>
  <div id="menu_newsEvents" class="menu_item">News/Events</div>
  <div id="event_toggle" class="toggle">toggle</div>
</h2>
<ul class="nav" id="eventMenu">
  <li><a <?php if ($current_file_name=="eventCal") echo "id=\"currentpage\""; ?> href="eventCal.php">Event Calender</a></li>
  <li><a <?php if ($current_file_name=="events") echo "id=\"currentpage\""; ?> href="events.php">List Events</a></li>
  <li><a <?php if ($current_file_name=="eventsform") echo "id=\"currentpage\""; ?> href="eventsform.php">New Event +</a></li>
  <li><a <?php if ($current_file_name=="newsarrange") echo "id=\"currentpage\""; ?> href="arrangenews.php">Arrange News</a></li>
  <li><a <?php if ($current_file_name=="newsform") echo "id=\"currentpage\""; ?> href="newsform.php">News Section +</a></li>
</ul> 
<!--Contacts-->
<h2 <?php 
	if (in_array($current_file_name, $contactsPage_current)){
		echo "class=\"currentpage has_submenu\""; 
	}else {
		echo "class=\"has_submenu\"";} ?>
>
  <div id="menu_contacts" class="menu_item">Contacts</div>
  <div id="contacts_toggle" class="toggle">toggle</div>
</h2>
<ul class="nav" id="contactsMenu">
	<li><a <?php if ($current_file_name=="users") echo "id=\"currentpage\""; ?> href="users.php">Users</a>
    	<span class="addUser">adduser</span>
        <div class="tooltip">Add a new user</div>
    </li>
    <li><a <?php if ($current_file_name=="contacts") echo "id=\"currentpage\""; ?> href="contacts.php">Arrange</a></li>
    <li><a <?php if ($current_file_name=="moduleform") echo "id=\"currentpage\""; ?> href="moduleform.php?page_id=4">Contact Section +</a></li>
</ul>